package com.ManagerGetHigh.test;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import com.ManagerGetHigh.Mybatis_Mappers.Interface_bill;
import com.ManagerGetHigh.model.billsBean;
import com.ManagerGetHigh.util.SQLSessionTools;
import com.alibaba.fastjson.JSON;

public class bill {

	SQLSessionTools sst = new SQLSessionTools();
	
	@Test
	public void findAlltableInfo() {
		SqlSession session = sst.getSession();
		Interface_bill mapper = session.getMapper(Interface_bill.class);
		List<billsBean> list = mapper.findAllTableInfo();
		session.commit();
		session.close();
		
		for(int i=0;i<list.size();i++) {
			System.out.println(list.get(i).toString());
		}
		
		String billString = JSON.toJSONString(list);
	
		System.out.println(billString);
	}
}
